import java.security.MessageDigest


/**
 * This class provides us with the ability to encode
 * our passwords using SHA-1 (yes, it's broken - get over it).
 * 
 * @author zach
 */
class SHACodec {
	static encode = {target->
		MessageDigest md = MessageDigest.getInstance('SHA');
		md.update(target.getBytes('UTF-8'));
		return new String(md.digest()).encodeAsBase64();
	}
}
